Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

netrc

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netrc

Parse netrc files

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
122K
increased by57.42%
Maintainers
1
Weekly downloads
 
Created

What is netrc?

The netrc npm package is used to read and write .netrc files, which are used to store credentials for remote systems. This package allows developers to programmatically manage these credentials, making it easier to automate tasks that require authentication.

What are netrc's main functionalities?

Read .netrc file

This feature allows you to read the .netrc file and retrieve stored credentials. The code sample demonstrates how to use the netrc package to read the .netrc file and log the credentials to the console.

const netrc = require('netrc');
const credentials = netrc();
console.log(credentials);

Write to .netrc file

This feature allows you to write new credentials to the .netrc file. The code sample shows how to add credentials for 'example.com' and save them to the .netrc file.

const netrc = require('netrc');
let credentials = netrc();
credentials['example.com'] = { login: 'user', password: 'pass' };
netrc.save(credentials);

Other packages similar to netrc

Keywords

FAQs

Package last updated on 02 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc